import request from "/@/core/axios";

const prefixUrl = "/user";

/**
 * 注册
 */

export const userRegister = (data: any) =>
  request({
    url: `${prefixUrl}/register`,
    method: "post",
    data,
  });

/**
 * 登录
 */

export const userLogin = (data: any) =>
  request({
    url: `${prefixUrl}/login`,
    method: "post",
    data,
  });

/**
 * token授权
 */

export const authToken = () =>
  request({
    url: `${prefixUrl}/token`,
    method: "post",
  });
